package com.etc.loop;

/**
 * @author: mxt
 * @create: 2024-09-03 15:22
 * @Version 1.0
 **/
public class TestLoop3 {
    public static void main(String[] args) {

        int j = 0;
        //while先判断，再执行
        while(j > 0){
            //执行循环体
            System.out.println("while " + j);
            j++;
        };
        System.out.println("********************");

        int i = 0;
        //do-while,先执行一次，再判断
        do {
            //执行循环体
            System.out.println("do-while " + i);
            i++;
        } while (i > 0);

    }
}
